package test_3_7;

import java.util.Scanner;

public class seven {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        System.out.println(FiBoNaQie(n));
    }
    public static int FiBoNaQie(int n)
    {
        int sum;
        int f1=1;
        int f2=1;
        int f3=f1+f2;
        if(n<=2)
        {
            return 1;
        }
        for(int i=0;i<n;i++) {
            f3 = f1 + f2;
            f1 = f2;
            f2 = f3;
        }

        return f3;
    }
}
